package com.lsk.util;


/**
 * Created by Administrator on 2017/6/24.
 */
public class ReturnData {
    private String msg;
    private Object data;
    private String code;
    private String Time=DateUtil.getSdfTimes();
    private boolean result;

    public ReturnData(){

    }

    public ReturnData(boolean sa){
        this.result=sa;
        if (sa){
            this.code="000000";
            this.msg="操作成功";

        }else {
            this.code="111111";
            this.msg="操作失败";
        }
    }
    public boolean isResult() {
        return result;
    }

    public void setResult(boolean result) {
        this.result = result;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        if (this.data==null){
            data="";
        }else {

        }
        if (this.result){
            this.msg="操作成功";
        }else {

        }
        return data;
    }

    public void setData(Object data) {
        if (data == null){
            this.data="";
        }else {
            this.data = data;
        }
    }

    public String getCode() {
        if (this.result){
            this.code="000000";
        }else if (this.result=false){
            this.code="111111";
        }else {

        }
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getTime() {
        return Time;
    }

    public void setTime(String time) {
        Time = time;
    }
}
